negotiator.boaframework.agent
Class BOAagent

java.lang.Object
  extended by negotiator.Agent
      extended by negotiator.boaframework.agent.BOAagent
Direct Known Subclasses:
SimpleBOAagent, TheBOAagent

public abstract class BOAagent
extends Agent

This class describes a basic decoupled agent. The TheBOAagent class extends this class and sets the required parameters.

Author:
Alex Dirkzwager, Mark Hendrikx

Field Summary
protected  AcceptanceStrategy acceptConditions
          when to accept
protected  NegotiationSession negotiationSession
          link to domain
protected  OfferingStrategy offeringStrategy
          what to offer
protected  OMStrategy omStrategy
          which bid to select using an opponent model
protected  OpponentModel opponentModel
          used to determine the utility of a bid for the opponent
protected  OutcomeSpace outcomeSpace
          space of possible bids
 java.util.ArrayList<Pair<Bid,java.lang.String>> savedOutcomes
          used to store MAC outcomes
 
Fields inherited from class negotiator.Agent
fNegotiation, parametervalues, sessionNr, sessionsTotal, startTime, strategyParameters, timeline, totalTime, utilitySpace
 
Constructor Summary
BOAagent()
           
 
Method Summary
abstract  void agentSetup()
          Method used to setup the agent.
 Action chooseAction()
          Choose an action to perform.
 void cleanUp()
          Clear the agent's variables.
 void endSession(NegotiationResult result)
          Method that first calls the endSession method of each component to update the session data and then stores the session data if it is not empty and is changed.
 AcceptanceStrategy getAcceptanceStrategy()
          Returns the acceptance strategy of the agent.
abstract  java.lang.String getName()
           
 OfferingStrategy getOfferingStrategy()
          Returns the offering strategy of the agent.
 OpponentModel getOpponentModel()
          Returns the opponent model of the agent.
protected  java.lang.String getUniqueIdentifier()
          Unique identifier for the BOA agent.
static java.lang.String getVersion()
           
 void init()
          Initializes the agent and creates a new negotiation session object.
 void ReceiveMessage(Action opponentAction)
          Store the actions made by a partner.
 void setDecoupledComponents(AcceptanceStrategy ac, OfferingStrategy os, OpponentModel om, OMStrategy oms)
          Set the components of the decoupled agent.
 
Methods inherited from class negotiator.Agent
getAgentID, getParameterValues, getSessionNumber, getSessionsTotal, getStrategyParameters, getUtility, internalInit, isUIAgent, loadSessionData, parseStrategyParameters, restartDataObjectsFolder, saveSessionData, setAgentID, setName, sleep
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

acceptConditions

protected AcceptanceStrategy acceptConditions
when to accept


offeringStrategy

protected OfferingStrategy offeringStrategy
what to offer


opponentModel

protected OpponentModel opponentModel
used to determine the utility of a bid for the opponent


negotiationSession

protected NegotiationSession negotiationSession
link to domain


omStrategy

protected OMStrategy omStrategy
which bid to select using an opponent model


savedOutcomes

public java.util.ArrayList<Pair<Bid,java.lang.String>> savedOutcomes
used to store MAC outcomes


outcomeSpace

protected OutcomeSpace outcomeSpace
space of possible bids

Constructor Detail

BOAagent

public BOAagent()
Method Detail

init

public void init()
Initializes the agent and creates a new negotiation session object.

Overrides:
init in class Agent

agentSetup

public abstract void agentSetup()
Method used to setup the agent. The method is called directly after initialization of the agent.


setDecoupledComponents

public void setDecoupledComponents(AcceptanceStrategy ac,
                                   OfferingStrategy os,
                                   OpponentModel om,
                                   OMStrategy oms)
Set the components of the decoupled agent.

Parameters:
ac - the acceptance strategy
os - the offering strategy
om - the opponent model
oms - the opponent model strategy

getUniqueIdentifier

protected java.lang.String getUniqueIdentifier()
Unique identifier for the BOA agent. The default method in agent does not suffice as all BOA agents have the same classpath.

Overrides:
getUniqueIdentifier in class Agent
Returns:
unique identifier of the Agent object.

getVersion

public static java.lang.String getVersion()

getName

public abstract java.lang.String getName()
Overrides:
getName in class Agent
Returns:
name of the agent.

ReceiveMessage

public void ReceiveMessage(Action opponentAction)
Store the actions made by a partner. First store the bid in the history, then update the opponent model.

Overrides:
ReceiveMessage in class Agent
Parameters:
opponentAction - by opponent in current turn

chooseAction

public Action chooseAction()
Choose an action to perform.

Specified by:
chooseAction in class Agent
Returns:
Action the agent performs

getOfferingStrategy

public OfferingStrategy getOfferingStrategy()
Returns the offering strategy of the agent.

Returns:
offeringstrategy of the agent.

getOpponentModel

public OpponentModel getOpponentModel()
Returns the opponent model of the agent.

Returns:
opponent model of the agent.

getAcceptanceStrategy

public AcceptanceStrategy getAcceptanceStrategy()
Returns the acceptance strategy of the agent.

Returns:
acceptance strategy of the agent.

endSession

public void endSession(NegotiationResult result)
Method that first calls the endSession method of each component to update the session data and then stores the session data if it is not empty and is changed.

Overrides:
endSession in class Agent
Parameters:
result - discounted utility of previous session round.

cleanUp

public void cleanUp()
Clear the agent's variables.